package CI.aufgabe2.cip.mynodes;

import CI.aufgabe2.cip.SymbolTable;
import CI.aufgabe2.cip.base.AbstractDescr;
import CI.aufgabe2.cip.descriptor.SimpleTypeDescr;

public class MyIntNode extends MyAbstractNode {

	private static final long serialVersionUID = 1L;

	int intVal;

	public MyIntNode() {
		intVal = 0;
	};
	
	public int getIntVal() {
		return intVal;
	}

	public MyIntNode(int fi) {
		intVal = fi;
	};

	public void print() {
		trace("MyIntNode " + intVal);
		unindent();
	};
	
	public int getSize() {
		return 1;
	}
	
	
	public AbstractDescr compile(SymbolTable sym) {
		write("PUSHI, "+intVal);
		return new SimpleTypeDescr("Integer");
	}
}
